<template>
  <div>
    <el-row>
      <el-table class="search-table" :data="list" border fit highlight-current-row style="width: 100%;">
        <el-table-column label="序号" align="center" width="56px">
          <template slot-scope="{$index}">
            {{ $index + 1 }}
          </template>
        </el-table-column>
        <el-table-column v-for="(item, index) in columns" :key="index" :label="item.label" width="200px" :prop="item.prop" />
      </el-table>
    </el-row>
  </div>
</template>

<script>

export default {
  name: '',
  props: {
    data: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      list: [],
      columns: []
    }
  },
  watch: {
  },
  created() {
    this.init()
  },
  methods: {
    init() {
      try {
        this.list = JSON.parse(this.data).list
      } catch (error) {
      }
      try {
        this.columns = JSON.parse(this.data).columns
      } catch (error) {
      }
      
    }
  }
}
</script>

<style scoped>
</style>
